home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 May / PC Answers CD-ROM 7 (Future Publishing) (May 1995).iso / vbits / code / barlow / xlole.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-09-22  |  906 b   |  34 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   1290
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   2220
  8.    Height          =   1695
  9.    Left            =   1035
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1290
  12.    ScaleWidth      =   2220
  13.    Top             =   1140
  14.    Width           =   2340
  15.    Begin CommandButton Command1 
  16.       Caption         =   "Command1"
  17.       Height          =   495
  18.       Left            =   360
  19.       TabIndex        =   0
  20.       Top             =   300
  21.       Width           =   1215
  22.    End
  23. 'Option Explicit
  24. Sub Command1_Click ()
  25. Dim APPXL As object
  26. Dim XL As object
  27. Dim WS As object
  28. Set APPXL = GetObject(, "Excel.Application")
  29. Set XL = APPXL.Application
  30. For i = 1 To XL.worksheets.count
  31.     Set WS = XL.worksheets(i)
  32.     MsgBox WS.name
  33. End Sub
  34.